import request from '@/utils/request'

export function xhrChannels(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/channels',
    method: 'get',
    params
  })
}

export function xhrChannelItem(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/channel/item',
    method: 'get',
    params
  })
}

export function xhrChannelChange(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/channel/change',
    method: 'get',
    params
  })
}

export function xhrVersions(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/versions',
    method: 'get',
    params
  })
}

export function xhrBasicList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/home',
    method: 'get',
    params
  })
}

export function xhroverviewList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/overview',
    method: 'get',
    params
  })
}

export function xhrGetTurnLottery(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/turn/lottery',
    method: 'get',
    params
  })
}

export function xhrGetTurnStatisticsList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/turn/statistics/list',
    method: 'get',
    params
  })
}

export function xhrRechargeRanking(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/user/recharge',
    method: 'get',
    params
  })
}

export function xhrPromotionCosts(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/promotion/costs',
    method: 'get',
    params
  })
}

export function xhrPromotionCostsUp(data) {
  return request({
    url: '/analysis/promotion/costs/up',
    method: 'post',
    data
  })
}

export function xhrRegisterRank(params) {
  return request({
    url: '/analysis/register/rank',
    method: 'get',
    params
  })
}

export function xhrGetEggRecords(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/egg/records',
    method: 'get',
    params
  })
}

export function xhrUpdateEggPublicPool(params) {
  const { publicPool } = params
  return request({
    url: `/user/update_egg_public_pool/${publicPool}`,
    method: 'put',
  })
}

export function xhrEggSingle(params) {
  return request({
    url: '/analysis/egg/single',
    method: 'get',
    params
  })
}

export function xhrGetEggStatistics(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/egg/statistics',
    method: 'get',
    params
  })
}

export function xhrGetEggAnalysis(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/egg/analysis',
    method: 'get',
    params
  })
}

export function xhrGetTurnApplyItem(data) {
  return request({
    url: '/analysis/turn/applyItem',
    method: 'post',
    data
  })
}

export function xhrGetTurnRedPacketItem(data) {
  return request({
    url: '/analysis/turn/redPacketItem',
    method: 'post',
    data
  })
}

export function xhrGetTurnRedPacket(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/turn/redPacket',
    method: 'get',
    params
  })
}

export function xhrActivateList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/activate',
    method: 'get',
    params
  })
}
export function xhrActiveUser(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/active/user',
    method: 'get',
    params
  })
}

export function xhrWashAway(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/ToWashAway/user',
    method: 'get',
    params
  })
}

export function xhrRechargeList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/recharge',
    method: 'get',
    params
  })
}

export function xhrRechargeAnalysisList(params = {
  limit: 20,
  page: 1
}){
  return request({
    url: '/analysis/recharge/Analysis',
    method: 'get',
    params
  })
}

export function xhrWithdrawList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/withdraw',
    method: 'get',
    params
  })
}

export function xhrDivisionList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/division',
    method: 'get',
    params
  })
}

export function xhrChatList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/chat',
    method: 'get',
    params
  })
}

export function xhrImMsgReversionRate(params = {
  limit: 20,
  page: 1
}){
  return request({
    url: '/anchor/imMsg/reversionRate',
    method: 'get',
    params
  })
}

export function xhrQuickMatchList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/quickMatch/list',
    method: 'get',
    params
  })
}

export function xhrDiamondList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/diamond',
    method: 'get',
    params
  })
}

export function xhrDiamondPropList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/prop/diamond',
    method: 'get',
    params
  })
}

export function xhrScorePropList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/prop/score',
    method: 'get',
    params
  })
}

export function xhrCardPropList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/prop/card',
    method: 'get',
    params
  })
}

export function xhrRealTimeActivation(params = {
}) {
  return request({
    url: '/analysis/realTime/activation',
    method: 'get',
    params
  })
}

export function xhrTicketPropList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/prop/ticket',
    method: 'get',
    params
  })
}

export function xhrVoiceCardPropList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/prop/voiceCard',
    method: 'get',
    params
  })
}


export function xhrPollenPropList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/prop/pollen',
    method: 'get',
    params
  })
}

export function xhrLuckCardList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/luckyCard/list',
    method: 'get',
    params
  })
}

export function xhrLuckGiftList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/luckyGift/list',
    method: 'get',
    params
  })
}

export function xhrAbnormityWarning(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/analysis/abnormity/warning',
    method: 'get',
    params
  })
}

